﻿<phone:PhoneApplicationPage 
    x:Class="CommunityMegaphone.MapView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:CommunityMegaphone" 
    xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" 
    d:DataContext="{d:DesignData SampleData/SearchResultsViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{Binding Events[0]}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock Style="{StaticResource CmTitleStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Title}" Style="{StaticResource PhoneTextTitle2Style}"/>
        </StackPanel>

        <maps:Map Grid.Row="1" Mode="Road" ZoomLevel="15" ZoomBarVisibility="Visible" Center="{Binding Location}" HorizontalAlignment="Center" Name="mapEvent" VerticalAlignment="Top" Width="470" Height="650" CredentialsProvider="AkDrevGfmGH_0fPrCzCsGMsx1HxDUVci_a_74TgwN0gbnGZtBzgIwIE8tC39xFBH">
            <maps:Pushpin Location="{Binding Location}">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="{Binding AddressLine1}"/>
                    <TextBlock Text="{Binding AddressLine2}"/>
                </StackPanel>
            </maps:Pushpin>
        </maps:Map>
    </Grid>

</phone:PhoneApplicationPage>
